<?php
class StatsController extends AppController {
    var $helpers = array ('Html','Form','Session');
    var $name = 'Stats'; // riferimento alla cartella delle view
    //var $modelClass = 'Multa';
    
    var $uses = false; //per non definire un model

    var $components = array('Permission','Acl'); 
	
	var $result = null;
    
    public function beforeFilter(){
		parent::beforeFilter();
        $this->Auth->allow('index','match','team');

    }

    public function index() {

    }
	
	public function match($localteamId,$visitorteamId) {
		
		$this->loadModel("Team");
		$localteam=$this->Team->read(null,$localteamId);
		$this->set("localteam",$localteam);
		$visitorteam=$this->Team->read(null,$visitorteamId);
		$this->set("visitorteam",$visitorteam);

		// $this->set("matchId",$matchId);
		
		$this->set("title_for_layout",  __("Statistiche %s %s",$localteam["Team"]["name"],$visitorteam["Team"]["name"]));
		$this->set("meta_description",  __("Consultazione statistiche delle partite di calcio."));
	    $this->set("breadcrumb",__("Stats"));
		
	}
	
	public function team($team) {
		
	}
	
	

}
?>